function fn1(){
    var temp1 = window.innerHeight || document.documentElement.clientHeight;
    var temp2 = document.body.scrollTop || document.documentElement.scrollTop;
    var maxheight=temp1+temp2;
    var imgs = document.querySelectorAll('img');
    imgs.forEach(function(item,i){
        if(item.offsetTop<maxheight){
            item.src=item.getAttribute('src-real');
        }
    })
}
 let t =null;
 fn1();

window.onscroll = function() {

 if (t) clearTimeout(t)


t = setTimeout(() => {
   fn1() 
},200)}